home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / misc / gms_pictures.lha / Pictures / PIC_CopyStructure.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-09-06  |  922 b   |  33 lines

  1.  
  2. #include <proto/dpkernel.h>
  3. #include <system/all.h>
  4.  
  5. /************************************************************************************
  6. ** Action: CopyToUnv()
  7. ** Object: Picture
  8. */
  9.  
  10. LIBFUNC void PIC_CopyToUnv(mreg(__a0) struct Universe *unv, mreg(__a1) struct Picture *pic)
  11. {
  12.   CopyStructure(pic->Bitmap,unv);
  13.   unv->Height  = pic->ScrHeight;
  14.   unv->ScrMode = pic->ScrMode;
  15.   unv->Source  = pic->Source;
  16.   unv->Width   = pic->ScrWidth;
  17. }
  18.  
  19. /************************************************************************************
  20. ** Action: CopyFromUnv()
  21. ** Object: Picture
  22. */
  23.  
  24. LIBFUNC void PIC_CopyFromUnv(mreg(__a0) struct Universe *unv, mreg(__a1) struct Picture *pic)
  25. {
  26.   CopyStructure(unv,pic->Bitmap);
  27.   if (!pic->ScrHeight) pic->ScrHeight = unv->Height;
  28.   if (!pic->ScrMode)   pic->ScrMode   = unv->ScrMode;
  29.   if (!pic->Source)    pic->Source    = unv->Source;
  30.   if (!pic->ScrWidth)  pic->ScrWidth  = unv->Width;
  31. }
  32.  
  33.